//类 公共 私有 受保护的修饰符  readonly 修饰符
class Animal {
    private name:string
    public constructor(name:string){
        this.name=name
    }
    public move(distance:number=0){
        console.log(`${this.name} moved ${distance}`)
    }

}

class Rhino extends Animal{
    constructor(){
        super('Rhino')
    }
}

class Employee {
    private name:string
    constructor(name:string){
        this.name=name
    }
}

let animal = new Animal('Goat')
let rhino = new Rhino()
let Employee=new Employee('Bob')

animal =rhino
animal =employee